import $http from './config'

//网站域名路径
export const baseHost = $http.baseHost

//接口地址路径
export const baseUrl = $http.baseUrl

// 登录
export const login = params => {
  return $http.post('/manager/login', params).then(res => res.data)
}
export const logout = params => {
  return $http.post('/manager/logout').then(res => res.data)
}

// 上传图片
export const uploadImg = params => {
  return $http.post('/upload/image', params)
}







/*
   admin管理
*/

// 获取 admin列表
export const getadmin = params => {
  return $http.post('/manager/finds', params)
}
// 获取 admin详情
export const getadmindetail = params => {
  return $http.post('/manager/detail', params)
}
// 添加 admin
export const createadmin = params => {
  return $http.post('/manager/create', params)
}
// 修改 admin
export const editadmin = params => {
  return $http.post('/manager/edit', params)
}
// 启用或者禁用 admin
export const statusadmin = params => {
  return $http.post('/manager/status', params)
}
// 删除 admin
export const deletesadmin = params => {
  return $http.post('/manager/delete', params)
}





/*
   order管理
*/

// 获取 order列表
export const getorder = params => {
  return $http.post('/manager/finds', params)
}
// 获取 order详情
export const getorderdetail = params => {
  return $http.post('/manager/detail', params)
}
// 添加 order
export const createorder = params => {
  return $http.post('/manager/create', params)
}
// 修改 order
export const editorder = params => {
  return $http.post('/manager/edit', params)
}
// 启用或者禁用 order
export const statusorder = params => {
  return $http.post('/manager/status', params)
}
// 删除 order
export const deletesorder = params => {
  return $http.post('/manager/delete', params)
}





/*
   admin管理
*/

// 获取 admin列表
// export const getadmin = params => {
//   return $http.post('/manager/finds', params)
// }
// // 获取 admin详情
// export const getadmindetail = params => {
//   return $http.post('/manager/detail', params)
// }
// // 添加 admin
// export const createadmin = params => {
//   return $http.post('/manager/create', params)
// }
// // 修改 admin
// export const editadmin = params => {
//   return $http.post('/manager/edit', params)
// }
// // 启用或者禁用 admin
// export const statusadmin = params => {
//   return $http.post('/manager/status', params)
// }
// // 删除 admin
// export const deletesadmin = params => {
//   return $http.post('/manager/delete', params)
// }





/*
   Test管理
*/

// 获取 Test列表
export const getTest = params => {
  return $http.post('/manager/finds', params)
}
// 获取 Test详情
export const getTestdetail = params => {
  return $http.post('/manager/detail', params)
}
// 添加 Test
export const createTest = params => {
  return $http.post('/manager/create', params)
}
// 修改 Test
export const editTest = params => {
  return $http.post('/manager/edit', params)
}
// 启用或者禁用 Test
export const statusTest = params => {
  return $http.post('/manager/status', params)
}
// 删除 Test
export const deletesTest = params => {
  return $http.post('/manager/delete', params)
}


